package cn.com.coding.system.domin;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author mxz
 */
@Data
@TableName("sys_user")
public class SysUserEntity extends BaseEntity {

    /**
     *
     */
    private String username;
    /**
     *
     */
    private String password;
    /**
     *
     */
    private String avatar;
    /**
     *
     */
    private String email;
    /**
     *
     */
    private String city;
    /**
     *
     */
    private Integer status;

    /**
     *
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date lastLogin;

    @TableField(exist = false)
    private List<SysRoleEntity> sysRoles = new ArrayList<>();
}
